﻿@{
    ViewBag.Title = "Đăng tài nguyên";
    Layout = "~/Views/Shared/FrontEndMasterLayout.cshtml";
}
@using DLULearningNetworkModel
@model DLULearningNetworkModel.File

@section cssjs{
    <link rel="Stylesheet" type="text/css" href="../../Content/Site.css" />    
}
@section rightColumn{
<div style="width:730px;">
    <div class="TieuDe">
        Đăng tài nguyên
    </div>
    <form id="frmUploadFile" enctype="multipart/form-data" method="post">
        @if(ViewBag.UploadFileMessage != null)
        {
            <div class="box_error" style="display:block;">@ViewBag.UploadFileMessage</div>
        }
        <table class="tbl1" cellspacing="10px">
            <tr>
                <td style="width:100px;">
                    File
                </td>
                <td>                
                    <input id="file_upload" name="file_upload" type="file" style="height:22px;"/>
                </td>
            </tr>
            <tr>
                <td>Lĩnh vực</td>
                <td>
                    @{
                        List<Category> categories = Category.GetAll();
                        List<KeyValuePair<string, string>> shares = new List<KeyValuePair<string, string>>();
                        shares.Add(new KeyValuePair<string, string>("Public", "Cộng đồng"));
                        shares.Add(new KeyValuePair<string, string>("Friends", "Bạn bè"));
                        shares.Add(new KeyValuePair<string, string>("Private", "Cá nhân"));
                    }
                    @for(int i = 0; i < categories.Count; i++){
                        <div class="checkboxContain">
                        @if(i == 0){
                            @Html.RadioButtonFor(m => m.CategoryID_u, categories[i].CategoryID_u, new {@checked = "checked"})
                        }
                        else
                        {
                            @Html.RadioButtonFor(m => m.CategoryID_u, categories[i].CategoryID_u)
                        }
                            <span>@categories[i].Name_s</span>
                        </div>
                    }
                </td>
            </tr>
            <tr>
                <td>Chia sẻ</td>
                <td>
                    @Html.DropDownListFor(m => m.Share_s, new SelectList(shares, "key", "value"), new {style = "height:22px;"})                   
                </td>
            </tr>
            <tr>
                <td>Tags<br />(Các tag cách nhau bởi dấu ",")</td>
                <td>
                    @Html.TextAreaFor(m => m.Description_s, new { style = "width:100%; height:70px; resize:none;" })                    
                </td>
            </tr>
            <tr>
                <td></td>
                <td>
                    <input class="button" type="submit" value="Đăng tài nguyên" />                    
                </td>
            </tr>
        </table>
    </form>
</div>
}
